﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static _01_Tower3._0.Game;
using static _01_Tower3._0.Hero;

namespace _01_Tower3._0
{
    internal class Enemy : Character
    {
        long currentTime, lastTime;
        Pos pos;
        Pos backup;

        public Enemy(string name, int hp, int mp, int atk, int def, Map map) : base(name, hp, mp, atk, def, map)
        {
        }

        //void Move(int offsetX, int offsetY)
        //{
        //    backup = pos;
        //    pos.x += offsetX;
        //    pos.y += offsetY;
        //    if (map.GetType(pos) == Map.Type.Wall)
        //    {
        //        pos = backup;
        //    }
        //    // 如果和玩家重叠 打开战斗系统
        //    // 需要获得玩家位置
        //    //Character player = scene.GetPlayer(pos);
        //    //if (player != null)
        //    //{
        //    //// todo 打开战斗系统
        //    //IsCombating = true;
        //    //// 战斗系统添加结束事件 用于恢复IsCombating
        //    //}
        //}

        //public void Update()
        //{
        //    currentTime = DateTime.Now.Ticks;
        //    if (currentTime - lastTime > Game.rand.Next(1000, 3000) * 10000)
        //    {
        //        Move(Game.rand.Next(-1, 2), Game.rand.Next(-1, 2));
        //        lastTime = currentTime;
        //    }
        //}
    }
}
